//
//  OnAirTimeView.m
//  linktuIOS
//
//  Created by sandy on 2017/8/17.
//  Copyright © 2017年 tianxie. All rights reserved.
//


#import "OnAirTimeView.h"
#import "Masonry.h"
@interface OnAirTimeView()
@property(nonatomic,strong) UILabel *titleLable;
@property(nonatomic,strong) UILabel *numberLable;
@property(nonatomic,strong) UIImageView *imageView;

@end

@implementation OnAirTimeView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self makeUI];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.layer.cornerRadius = self.frame.size.height/2;
    self.layer.masksToBounds = YES;
}

-(void)makeUI
{
    self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.4];
    _titleLable = [UILabel new];
    
    _titleLable.textColor = [UIColor whiteColor];
    _titleLable.font = [UIFont systemFontOfSize:10];
    //    _titleLable.text = @"点赞:1";
    self.titleLable.text = [NSString stringWithFormat: NSLTLocalizedString(@"%ld", nil),0];
    [self addSubview:_titleLable];
    
    [_titleLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.mas_centerY).offset(0);
        make.left.mas_equalTo(self.mas_left).offset(10);
        make.right.mas_equalTo(self.mas_right).offset(-10);
    }];
}

-(void)setTime:(NSString *)time
{
    _time = time;
    self.titleLable.text = [NSString stringWithFormat: NSLTLocalizedString(@"%@", nil),time];
}


-(void)dealloc
{
    NSLog(@"dealloc --LiveLightView");
    
}

@end
